package com.pashanhoo.distributed;

import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**模拟分布式下的服务器ip
 * @author 胡庆安
 * @version V1.0
 * @Package com.pashanhoo.distributed
 * @date 2020/10/29 15:38
 * @Copyright © 2010-2020 爬山虎科技（扬州）股份有限公司
 */
public class ServerIps {

    public static final List<String> LIST = Arrays.asList(
            "192.168.0.1",
            "192.168.0.2",
            "192.168.0.3",
            "192.168.0.4",
            "192.168.0.5",
            "192.168.0.6",
            "192.168.0.7",
            "192.168.0.8",
            "192.168.0.9",
            "192.168.0.10"
            );

    public static final Map<String,Integer> WEIGHT_LIST = new LinkedHashMap<>();
    static {
        WEIGHT_LIST.put("192.168.0.1",1);
        WEIGHT_LIST.put("192.168.0.2",8);
        WEIGHT_LIST.put("192.168.0.3",3);
        WEIGHT_LIST.put("192.168.0.4",6);
        WEIGHT_LIST.put("192.168.0.5",5);
        WEIGHT_LIST.put("192.168.0.6",5);
        WEIGHT_LIST.put("192.168.0.7",4);
        WEIGHT_LIST.put("192.168.0.8",7);
        WEIGHT_LIST.put("192.168.0.9",2);
        WEIGHT_LIST.put("192.168.0.10",9);
    }
}
